raqote
A pure Rust 2D Graphics Library.
Raqote is a small, simple, fast software 2D graphics library.
Current functionality
- path filling
- stroking
- dashing
- image, solid, and gradient fills
- rectangular and path clipping
- blend modes
- layers
- repeat modes for images
- global alpha
Notable users
- resvg supports using raqote as a backend.
- Servo uses raqote as its canvas backend.
- orbtk uses raqote.
Example:
A simple example drawing to a window
Another example drawing to a png follows:
use *;
let mut dt = new;
let mut pb = new;
pb.move_to;
pb.cubic_to;
pb.quad_to;
pb.quad_to;
pb.close;
let path = pb.finish;
let gradient = new_radial_gradient;
dt.fill;
let mut pb = new;
pb.move_to;
pb.line_to;
pb.line_to;
let path = pb.finish;
dt.stroke;
dt.write_png;
Produces: